package vn.edu.ptithcm.pim.service;

import java.util.List;

import vn.edu.ptithcm.pim.dao.NewsDao;
import vn.edu.ptithcm.pim.dom.News;
import vn.edu.ptithcm.pim.query.NewsQuery;

@SuppressWarnings({ "rawtypes" })
public class NewsService {
	private NewsDao newsDao;

	public NewsDao getNewsDao() {
		return newsDao;
	}

	public void setNewsDao(NewsDao newsDao) {
		this.newsDao = newsDao;
	}

	public void save(News news) {
		newsDao.save(news);
	}

	public void saveOrUpdate(News news) {
		newsDao.saveOrUpdate(news);
	}

	public void lock(News news) {
		newsDao.lock(news);
	}

	public void delete(News news) {
		newsDao.delete(news);
	}

	public News merge(News news) {
		return newsDao.merge(news);
	}

	public News findById(java.lang.Long id) {
		return newsDao.findById(id);
	}

	public List findByExample(News news) {
		return newsDao.findByExample(news);
	}

	public List getAll() {
		return newsDao.getAll();
	}

	public List<News> getNewsByType(String type, int max, int offset) {
		return newsDao.getNewsByType(type, max, offset);
	}

	public List<News> getNewNewsByType(String type) {
		return newsDao.getNewNewsByType(type);
	}

	public void deleteById(java.lang.Long id) {
		newsDao.deleteById(id);
	}

	public List<News> findByQuery(NewsQuery query, int max, int offset) {
		return newsDao.findByQuery(query, max, offset);
	}

	public int countByQuery(NewsQuery query) {
		return newsDao.countByQuery(query);
	}
}
